'use strict';

function average_to_letter(collection) {
  var arr;
  var ab,ac;
  for(let item of collection){
     var a=collection.reduce( function (total,item){
     return total + item;}
     ,0);
  }
  ab=a%collection.length;
  ac=a/collection.length;
  if(ab==0){
    arr= String.fromCharCode(ac%26+96);
  }else if(ab!=0){
    arr= String.fromCharCode((parseInt(ac)+1)%26+96);
  }
console.log(arr);
return arr; //在这里写入代码
}

module.exports = average_to_letter;

